#include "LPC11xx.h"                    // Device header

#include "bwl.h"

void speaker_init()
{
	setbit(LPC_SYSCON->SYSAHBCLKCTRL, 16);
	setbit(LPC_IOCON->R_PIO1_1, 0);
	setbit(LPC_GPIO1->DIR,1);
}

void speaker_on()
{
	while(1)
	{
		togbit(LPC_GPIO1->DATA,1);
		delay_us(390);	
	}
	
}
int main()
{
	speaker_init();
	speaker_on();
	
	return 0;
	
}